<?php
class Sws_transaction_log_model extends CI_Model {

	public function __construct() {
		parent :: __construct();
		$this->sws = $this->load->database('sws', true);
		date_default_timezone_set('Asia/Shanghai');
	}

	public function insert_log($log_info) {
		$data = array (
			"TRANSACTION_CODE" => $log_info['transaction_code'],
			"AMOUNT" => $log_info['amount'],
			"TRANSACTION_TYPE" => $log_info['transaction_type'],
			"ACCOUNT_NO" => $log_info['account_no'],
			"MERCHANT_ID" => $log_info['merchant_id'],
			"PRODUCT_NAME" => $log_info['product_name'],
			"TRANSACTION_TIME" => $log_info['transaction_time']
		);
		$this->sws->insert("SWS_TRANSACTION_LOG", $data);
	}
}
